<ion-view view-title="分仓转授权中心" class="personaldata">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button>
		</ion-nav-back-button>

		<ion-nav-buttons side="right">
			<button class="button button-clear icon ion-save" on-tap="do_save()" ng-if='isLoad' >提交</button>
		</ion-nav-buttons>
	</ion-nav-bar>

	<ion-content ng-show='isLoad'>
		<div class="head list-inset">
			<div class="row padding-0">
				<div class="col col-100 padding-0" style="color: red">
					请完善转授权中心所必须的企业信息。
				</div>
			</div>
		</div>

		<div class="list list-inset">
			<div class="item item-divider">公司</div>
			<div class="item item-text-wrap">
				店铺名称：　{{data.store.store_name}}
			</div>

			<label class="item item-input"><span class="input-label">公司名称<i class='required'>*</i></span>
				<input type="text" placeholder="请输入公司名称" ng-model='data.store.company_name' maxlength='30'></label>

			<label class="item item-input"><span class="input-label">统一社会信用代码<i class='required'>*</i></span>
				<input type="text" placeholder="请输入统一社会信用代码" ng-model='data.store.company_no' maxlength='30'></label>
		</div>

		<div class="list list-inset">
			<div class="item item-divider item-input">
				<span class="input-label">经营范围<i class='required'>*</i></span>
			</div>
			<label class="item item-input">
				<textarea rows="5" placeholder="经营范围" style="padding-right: 44px;" ng-model='data.store.company_remark' maxlength='200'></textarea>
			</label>
		</div>

		<div class="list list-inset">
			<div class="item item-divider">企业简介<i class='required'>*</i></div>
			<label class="item item-input">
				<textarea rows="5" placeholder="企业简介" style="padding-right: 44px;" ng-model='data.store.company_profile' maxlength='200'></textarea>
			</label>
		</div>


		<div class="list list-inset">
			<div class="item item-divider item-input">
				<span class="input-label">主营品类<i class='required'>*</i></span>
			</div>
			<li class="item padding-5">
				<div class="row text-center" ng-repeat="catrow in data.store_cat.cats" ng-style='{marginTop: $index>0?"6px":"0"}'>
					
						<div class="input-value small" ng-click="doSelectCatRow1(catrow,$index)">{{catrow.value1_select.text}}</div>
						<div class="input-value small" ng-click="doSelectCatRow2(catrow,$index)">{{catrow.value2_select.text}}</div>
						<div class="input-value small" ng-click="doSelectCatRow3(catrow,$index)">{{catrow.value3_select.text}}</div>

					<div class="col col-10" ng-show='$index==data.store_cat.cats.length-1'>
						<i class="icon ion-ios-plus-outline font-1rem-my disable-user-behavior" on-tap='add_StoreCat()'></i>
					</div>
					<div class="col col-10" ng-show='$index<data.store_cat.cats.length-1'>
						<i class="icon ion-ios-minus-outline font-1rem-my disable-user-behavior" on-tap='remove_StoreCat()'></i>
					</div>
				</div>
			</li>
		</div>

		<div class="list list-inset">
			<div class="item item-divider">途径</div>
			<label class="item item-input">
				<span class="input-label">开发<i class='required'>*</i></span>
				<input type="text" placeholder="服务商销售员" ng-model='data.store.regist_source_code' maxlength='20'>
			</label>
			<li class="item item-input-inset  padding-5">
				<label class="checkbox">
					<input type="checkbox" ng-model='data.regist_source_flg1' on-tap="change_regist_source(1)">
				</label>
				<span style='width: 50px;'>推荐</span>
				<input type="text" placeholder="推荐" style="margin-left: 2rem;" ng-model='data.store.regist_source_recommend' maxlength='20'>
			</li>
			<li class="item item-input-inset padding-5">
				<label class="checkbox">
					<input type="checkbox" ng-model='data.regist_source_flg2' on-tap="change_regist_source(2)">
				</label>
				<div style="width: 50px;" class="input-value small" ng-click="doSelectAdvs()">{{regist_source_other_type_select.name}}</div>
				<input type="text" placeholder="推荐内容" style="margin-left: 2rem;" ng-model='data.store.regist_source_other' maxlength='20'>
			</li>
		</div>

		<div class="list list-inset" ng-if="!(data.store.issue_type=='3' && data.is_warehouse)">
			<div class="item item-divider">上传文件</div>

			<label class="item item-input"><span class="input-label">营业执照<i class='required'>*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_cid'>
					<img ng-src='{{data.store.image_cid_path}}' on-tap="openFileActSheet('image_cid')"/>
				</a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_cid' on-tap="addStoreImg('image_cid')"><span class="icon ion-plus"></span></a>
			</label>

			<label class="item item-input"><span class="input-label">荣誉证书<i class='required' ng-show="data.store.issue_type=='2'">*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-repeat="img in data.store.image_cert1">
					<img ng-src='{{data.store.image_cert1_path[$index]}}' on-tap="openFileActSheet('image_cert1', $index)"/></a>
				<a class="add input-file" href="javascript:void(0);"><span class="icon ion-plus" on-tap="addStoreImg('image_cert1')"></span></a>
			</label>
			<label class="item item-input"><span class="input-label">授权书</span>
				<a class="add input-file" href="javascript:void(0);" ng-repeat="img in data.store.image_cert2">
					<img ng-src='{{data.store.image_cert2_path[$index]}}' on-tap="openFileActSheet('image_cert2', $index)"/></a>
				<a class="add input-file" href="javascript:void(0);"><span class="icon ion-plus" on-tap="addStoreImg('image_cert2')"></span></a>
			</label>

			<div class="item item-divider">库房照片</div>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;照片1<i class='required'>*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_place1'>
					<img ng-src='{{data.store.image_place1_path}}' on-tap="openFileActSheet('image_place1')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_place1' on-tap="addStoreImg('image_place1')"><span class="icon ion-plus"></span></a>
			</label>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;照片2<i class='required'>*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_place2'>
					<img ng-src='{{data.store.image_place2_path}}' on-tap="openFileActSheet('image_place2')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_place2' on-tap="addStoreImg('image_place2')"><span class="icon ion-plus"></span></a>
			</label>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;照片3<i class='required'>*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_place3'>
					<img ng-src='{{data.store.image_place3_path}}' on-tap="openFileActSheet('image_place3')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_place3' on-tap="addStoreImg('image_place3')"><span class="icon ion-plus"></span></a>
			</label>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;照片4<i class='required'>*</i></span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_place4'>
					<img ng-src='{{data.store.image_place4_path}}' on-tap="openFileActSheet('image_place4')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_place4' on-tap="addStoreImg('image_place4')"><span class="icon ion-plus"></span></a>
			</label>

			<div class="item item-divider">法人身份证</div>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;正面</span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_id'>
					<img ng-src='{{data.store.image_id_path}}' on-tap="openFileActSheet('image_id')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_id' on-tap="addStoreImg('image_id')"><span class="icon ion-plus"></span></a>
			</label>
			<label class="item item-input"><span class="input-label">&nbsp;&nbsp;&nbsp;反面</span>
				<a class="add input-file" href="javascript:void(0);" ng-if='!!data.store.image_id2'>
					<img ng-src='{{data.store.image_id2_path}}' on-tap="openFileActSheet('image_id2')"/></a>
				<a class="add input-file" href="javascript:void(0);" ng-if='!data.store.image_id2' on-tap="addStoreImg('image_id2')"><span class="icon ion-plus"></span></a>
			</label>

		</div>
	</ion-content>
</ion-view>